﻿@model DTcms.Model.BaseModel
@{
    var m = (DTcms.Model.article)Model.info["article"];
}
@if (!string.IsNullOrEmpty(m.fields["video_src"]))
{
    <script type="text/javascript" src="/scripts/DPlayer/flv.min.js"></script>
    <script type="text/javascript" src="/scripts/DPlayer/hls.min.js"></script>
    <div id="dplayer" style="width:100%"></div>
    <script type="text/javascript">
        layui.use(['DPlayer'], function () {
            var DPlayer = layui.DPlayer;
            var dp = new DPlayer({
                container: document.getElementById('dplayer'),
                screenshot: true,
                autoplay: false,
                video: {
                    url: '@m.fields["video_src"]'
                },
                danmaku: {
                    id: '@m.id',
                    channel_id: '@m.channel_id',
                    maximum: 3000,
                    user: '游客',
                    api: '@(Model.config.webpath)api/submit_ajax/'
                }
            });
        });
    </script>
}